﻿<%@ Page Language="C#" MasterPageFile="~/Template/Master_Admin.Master" AutoEventWireup="true" CodeBehind="QuanLySanPham.aspx.cs" Inherits="BTN04.ADMIN.WebForm1" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 154px;
        }
        .style3
        {
            width: 257px;
        }
        .style4
        {
            width: 185px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMenuTrai" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <table class="style1">
        <tr>
            <td style="text-align:center;color:Aqua">
                QUẢN LÝ SẢN PHẨM
            </td>
        </tr>
        <tr>
            <td>
             <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1" 
        PageSize="5" ShowFooter="True" AllowPaging="True" HorizontalAlign="Center" 
                    Width="601px"  
                    onrowdatabound="GridView1_RowDataBound" onselectedindexchanged="GridView1_SelectedIndexChanged" 
                   >
                 <PagerSettings FirstPageText="Trang đầu" Mode="NumericFirstLast" 
                     PreviousPageText="Trang cuối" />
                 <FooterStyle HorizontalAlign="Center" />
                 <RowStyle ForeColor="#FF6699" HorizontalAlign="Center" />
        <Columns>
            <asp:BoundField DataField="MaSanPham" HeaderText="Mã SP" 
                SortExpression="MaSanPham" />
            <asp:BoundField DataField="TenSanPham" HeaderText="Tên Sản Phẩm" 
                SortExpression="TenSanPham" />
            <asp:BoundField DataField="TenXuatSu" HeaderText="Tên Xuất Sứ" 
                SortExpression="TenXuatSu" />
            <asp:BoundField DataField="TenLoaiSanPham" HeaderText="Loại Sản Phẩm" 
                SortExpression="TenLoaiSanPham" />
            <asp:BoundField DataField="TenNhaSanXuat" HeaderText="Nhà Sản Xuất" 
                SortExpression="TenNhaSanXuat" />
            <asp:ButtonField Text="Xóa" />
            <asp:CommandField SelectText="Chọn" ShowSelectButton="True">
                <ItemStyle ForeColor="#66FF33" HorizontalAlign="Center" />
            </asp:CommandField>
        </Columns>
                 <PagerStyle ForeColor="#66CCFF" HorizontalAlign="Center" />
                 <EmptyDataTemplate>
                     Mã SP
                 </EmptyDataTemplate>
                 <HeaderStyle ForeColor="#FF3300" />
    </asp:GridView>
            </td>
            <tr>
                    <td>
                        
                        <table style="color:Teal">
                            <tr>
                                <td class="style2">
                                    Mã Sản Phẩm
                                </td>
                                <td class="style3">
                                    <asp:TextBox ID="txtMaSP" runat="server" Width="128px" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td  rowspan="9">
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Tên Sản Phẩm</td>
                                <td class="style3">
                                    <asp:TextBox ID="txtTenSP" runat="server" Width="242px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Loại Sản Phẩm</td>
                                <td class="style3">
                                    <asp:DropDownList ID="drLoaiSP" runat="server" Width="172px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Tình Trạng Sản Phẩm</td>
                                <td class="style3">
                                    <asp:DropDownList ID="drTinhTrangSP" runat="server" Width="161px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Nhà Sản Xuất</td>
                                <td class="style3">
                                    <asp:DropDownList ID="drNhaSX" runat="server" Width="158px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Gía Bán</td>
                                <td class="style3">
                                    <asp:TextBox ID="txtGiaBan" runat="server" Width="143px"></asp:TextBox>
                                                            </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Số lượng tồn</td>
                                <td class="style3">
                                    <asp:TextBox ID="txtSoLuongTon" runat="server" style="width: 128px" 
                                        Width="170px"></asp:TextBox>
                                                            </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Số lượng xem</td>
                                <td class="style3">
                                    <asp:TextBox ID="txtSoLuongXem" runat="server" Width="186px"></asp:TextBox>
                                                            </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Xuất sứ</td>
                                <td class="style3">
                                    <asp:DropDownList ID="drXuatXu" runat="server" Width="130px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Hình Anh</td>
                                <td class="style3" id="txtHinhAnh">
                                    <asp:TextBox ID="txtHinhAnh" runat="server" Width="242px"></asp:TextBox>
                                </td>
                                <td class="style4">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Khuyến mãi</td>
                                <td class="style3" id="MaSP">
                                    <asp:DropDownList ID="drKhuyenMai" runat="server" Width="186px">
                                    </asp:DropDownList>
                                </td>
                                <td class="style4">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style2">
                                    Mô tả</td>
                                <td class="style3">
                                    <asp:TextBox ID="txtMoTa" runat="server" Width="261px"></asp:TextBox>
                                </td>
                                <td class="style4">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td class="style2"></td>
                                <td id="Hi"><asp:Button  runat="server" ID="btnSửa" Text="Sửa" Width="77px" 
                                        onclick="btnSửa_Click" /> &nbsp;&nbsp;
                                    <asp:Button runat="server" ID="btnThem" Text="Thêm" Width="65px" 
                                        onclick="btnThem_Click" /> </td>
                                <td></td>
                            </tr>
                        </table>
                        
                    </td>
            </Tr>
        </tr>
     
    </table>

  
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="HienThiChiTietToanBoSanPham" TypeName="BTN04.BUS.SanPhamBUS" 
        UpdateMethod="XoaMotSanPhamDuaVaoMa">
        <UpdateParameters>
            <asp:Parameter Name="ma" Type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphMEnuPhai" runat="server">
</asp:Content>
